package com.rico.deploy.service.impl;

import com.rico.deploy.entity.CourseDetailRelation;
import com.rico.deploy.mapper.CourseDetailRelationMapper;
import com.rico.deploy.service.CourseDetailRelationService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author 夏智力
 * @FileName CourseDetailRelationServiceImpl
 * @date 2021/5/2 17:43
 * @Software: IntelliJ IDEA
 */
public class CourseDetailRelationServiceImpl implements CourseDetailRelationService {
    @Autowired
    private CourseDetailRelationMapper courseDetailRelationMapper;

    @Override
    public List<CourseDetailRelation> selectAll() {
        return courseDetailRelationMapper.selectAll();
    }

    @Override
    public CourseDetailRelation selectById(Integer id) {
        return courseDetailRelationMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertCourseDetailRelation(CourseDetailRelation courseDetailRelation) {
        return courseDetailRelationMapper.insert(courseDetailRelation);
    }

    @Override
    public int deleteCourseDetailRelationById(Integer id) {
        return courseDetailRelationMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateCourseDetailRelation(CourseDetailRelation courseDetailRelation) {
        return courseDetailRelationMapper.updateByPrimaryKey(courseDetailRelation);
    }
}
